package com.kawa.kemanage.util;

import lombok.Data;
import java.util.List;

/**
 * 分页结果包装类
 * @param <T> 数据类型
 */
@Data
public class PageResult<T> {
    private List<T> records;    // 当前页数据列表
    private long total;         // 总记录数
    private long size;          // 每页显示条数
    private long current;       // 当前页码

    public PageResult() {
    }

    public PageResult(List<T> records, long total, long size, long current) {
        this.records = records;
        this.total = total;
        this.size = size;
        this.current = current;
    }

    public static <T> PageResult<T> of(List<T> records, long total, long size, long current) {
        return new PageResult<>(records, total, size, current);
    }
} 